<?php
require_once("includes/include.php");
$dao = new preinfodao();
$post = $_POST;
$type= $post["postType"];
if ($type==1){
	$oldPwd = $post["oldPwd"];
	$newPwd = $post["newPwd"];
	@session_start();
	$userId = $_SESSION["userId"];
	$updatepwd = $dao->updatePwd($oldPwd,$newPwd,$userId);
	if($updatepwd=="ok"){
		echo "success";
	}else if ($updatepwd=="oldpwdwrong"){
		echo "oldpwdwrong";
	}else if ($updatepwd==""){
		echo "更改失败";
	}
}

?>